VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmBuscarCriterioEmpleados 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "Busqueda de Empleados  por Criterios"
   ClientHeight    =   4368
   ClientLeft      =   36
   ClientTop       =   300
   ClientWidth     =   7860
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Moveable        =   0   'False
   ScaleHeight     =   4368
   ScaleWidth      =   7860
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton CmdSalir 
      BackColor       =   &H00E0E0E0&
      Caption         =   "&Salir"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   6.6
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   6840
      Picture         =   "frmBuscarCriterioEmpleados.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   13
      Top             =   3600
      Width           =   735
   End
   Begin VB.TextBox txtCodigoCliente 
      Alignment       =   1  'Right Justify
      Height          =   288
      Left            =   240
      TabIndex        =   0
      Top             =   840
      Width           =   1350
   End
   Begin VB.CommandButton cmdFiltrar 
      Caption         =   "Ejecutar Filtro"
      Height          =   372
      Left            =   5640
      TabIndex        =   5
      Top             =   3840
      Width           =   1092
   End
   Begin VB.TextBox txtSegundoApellido 
      Height          =   288
      Left            =   6000
      TabIndex        =   4
      Top             =   840
      Width           =   1350
   End
   Begin VB.TextBox txtPrimerApellido 
      Height          =   288
      Left            =   4560
      TabIndex        =   3
      Top             =   840
      Width           =   1350
   End
   Begin VB.TextBox txtSegundoNombre 
      Height          =   288
      Left            =   3120
      TabIndex        =   2
      Top             =   840
      Width           =   1350
   End
   Begin VB.TextBox txtPrimerNombre 
      Height          =   288
      Left            =   1680
      TabIndex        =   1
      Top             =   840
      Width           =   1350
   End
   Begin MSDataGridLib.DataGrid GrdDetalle 
      Height          =   2052
      Left            =   240
      TabIndex        =   11
      Top             =   1440
      Width           =   7212
      _ExtentX        =   12721
      _ExtentY        =   3620
      _Version        =   393216
      BackColor       =   12648447
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   7.8
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   7.8
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin VB.Label Label8 
      BackStyle       =   0  'Transparent
      Caption         =   "Codigo Cliente"
      Height          =   252
      Left            =   240
      TabIndex        =   12
      Top             =   600
      Width           =   1332
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "Segundo Apellido"
      Height          =   252
      Left            =   6000
      TabIndex        =   10
      Top             =   600
      Width           =   1332
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "Segundo Nombre"
      Height          =   252
      Left            =   3120
      TabIndex        =   9
      Top             =   600
      Width           =   1332
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "Primer Apellido"
      Height          =   252
      Left            =   4560
      TabIndex        =   8
      Top             =   600
      Width           =   1212
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "Primer Nombre"
      Height          =   252
      Left            =   1680
      TabIndex        =   7
      Top             =   600
      Width           =   1092
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "Criterio de Busqueda "
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.6
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   252
      Left            =   240
      TabIndex        =   6
      Top             =   240
      Width           =   2292
   End
End
Attribute VB_Name = "frmBuscarCriterioEmpleados"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False



Private Sub cmdFiltrar_Click()
    
    If DE.rsBusqueEmpleado.State = adStateOpen Then DE.rsBusqueEmpleado.Close
    
    
    DE.BusqueEmpleado 1, txtCodigoCliente.Text, UCase(txtPrimerNombre.Text), UCase(txtSegundoNombre.Text), UCase(txtPrimerApellido.Text), UCase(txtSegundoApellido.Text)
    
       With grdDetalle
        Set .DataSource = DE
            .DataMember = "BusqueEmpleado"
            .Columns(0).Width = 1400
            .Columns(1).Width = 1400
            .Columns(2).Width = 1400
            .Columns(3).Width = 1400
            .Columns(4).Width = 1400

            
       End With

End Sub

Private Sub CmdSalir_Click()
        Unload Me
End Sub

Private Sub Form_Load()
   
     Left = Screen.Width / 2 - Width / 2
    Top = (Screen.Height / 2 - Height / 2) - 800
    LimpiarObjetos Me
    txtCodigoCliente.Text = ""
    txtPrimerNombre.Text = ""
    txtSegundoNombre.Text = ""
    txtPrimerApellido.Text = ""
    txtSegundoApellido.Text = ""

    
    
End Sub

Private Sub GrdDetalle_Click()
    On Error Resume Next
    CodigoPublico = ""
    grdDetalle.Col = 0
    Vcodigo = grdDetalle.Text
    If Vcodigo = "" Then Exit Sub
    Unload Me
End Sub

Private Sub txtApellidoCasada_KeyDown(KeyCode As Integer, Shift As Integer)
HacerTab KeyCode
End Sub

Private Sub txtApellidoCasada_LostFocus()
txtApellidoCasada.Text = UCase(txtApellidoCasada.Text)
End Sub

Private Sub txtCodigoCliente_KeyDown(KeyCode As Integer, Shift As Integer)
    HacerTab KeyCode
End Sub

Private Sub txtPrimerApellido_KeyDown(KeyCode As Integer, Shift As Integer)
HacerTab KeyCode
End Sub

Private Sub txtPrimerApellido_LostFocus()
txtPrimerApellido.Text = UCase(txtPrimerApellido.Text)
End Sub

Private Sub txtPrimerNombre_KeyDown(KeyCode As Integer, Shift As Integer)
HacerTab KeyCode
End Sub

Private Sub txtPrimerNombre_LostFocus()
    txtPrimerNombre.Text = UCase(txtPrimerNombre.Text)
End Sub

Private Sub txtSegundoApellido_KeyDown(KeyCode As Integer, Shift As Integer)
HacerTab KeyCode
End Sub

Private Sub txtSegundoApellido_LostFocus()
txtSegundoApellido.Text = UCase(txtSegundoApellido.Text)
End Sub

Private Sub txtSegundoNombre_KeyDown(KeyCode As Integer, Shift As Integer)
HacerTab KeyCode
End Sub

Private Sub txtSegundoNombre_LostFocus()
    txtSegundoNombre.Text = UCase(txtSegundoNombre.Text)
End Sub

